import 'package:freezed_annotation/freezed_annotation.dart';

part 'load_state_model.freezed.dart';

@freezed
class LoadStateType with _$LoadStateType {
  //初始化
  factory LoadStateType.initial() = LoadStateTypeInitial;
  //刷新中
  factory LoadStateType.refreshIng() = LoadStateTypeRefreshIng;
  //刷新完成
  factory LoadStateType.refreshSuccess() = LoadStateTypeRefreshDone;
  //刷新失败
  factory LoadStateType.refreshError() = LoadStateTypeRefreshError;
  //加载更多中
  factory LoadStateType.loadMoreIng() = LoadStateTypeLoadMoreIng;
  //加载更多完成
  factory LoadStateType.loadMoreSuccess({required bool hasMore}) = LoadStateTypeLoadMoreDone;
  //加载更多失败
  factory LoadStateType.loadMoreError() = LoadStateTypeLoadMoreError;

  LoadStateType._();
}
